
SPL=tools/sunxi-spl.bin
STARTADDR=0x43B00000

[ -e rtthread.bin ] || { echo 'Can not find file "rtthread.bin"!' && exit 1; }
[ -e $SPL ] || { echo 'Can not find file "$SPL"!' && exit 1; }

mkimage -A arm -O u-boot -T firmware -C none -a "$STARTADDR" -e 0 -n 'RT-Thread' -d rtthread.bin rtthread.uimg && \
cat $SPL rtthread.uimg >rtt-with-spl.bin && \
echo 'New rtt-with-spl.bin generated!' || echo 'Failed!'
